import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int q = in.nextInt();
        int[] arr = new int[q];
        for(int i = 0; i < q; i++) {
            int x = in.nextInt();
            if(x == 5 || x == 6) {
                arr[i] = 2300;
            }else {
                arr[i] = 2230;
            }
        }
        for(int x:arr) {
            System.out.println(x);
        }
    }
}